from pymongo import MongoClient
client = MongoClient()
db = client.test_database
import datetime
post = {"author": "Mike",
        "text": "My first blog post!",
        "tags": ["mongodb", "python", "pymongo"],
        "date": datetime.datetime.utcnow()}

posts = db.posts

posts.insert(post)
print post
#posts.insert(post)
#posts.insert(post)

for i in posts.find({"author": "Mike"}, {"author":1}): print i
#print posts.update({"sex":"male"},{"$unset":{"author": 1}})
#print posts.find_one({"sex":"male"})
#post_id = posts.insert(post)
#print post_id
